<?php

class OOWP_Atom_BlogTitle
    extends OOWP_Formattable
{

    public function __construct(array $args = array( ))
    {
        $input = array_merge(array(
            'formatting' => '&laquo; %s &raquo;',
        ), $args);

        parent::__construct($input);
    }

    protected function getFormatting( )
    {
        return $this->dict['formatting'];
    }

    protected function setFormatting($format)
    {
        $this->dict['formatting'] = $format;
    }

    protected function getFormatPieces( )
    {
        $name = get_bloginfo('name');
        $href = get_bloginfo('url');
        $link = '<a href="' . $href . '" title="' . $name . '">' . $name . '</a>';
        return array(
            sprintf($this->formatting, $link),
        );
    }

}
